package com.example.api.gateway.filter;

import com.netflix.zuul.FilterProcessor;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;

public class DidiFilterProcessor extends FilterProcessor{
	
	@Override
	 public Object processZuulFilter(ZuulFilter filter) throws ZuulException {
		 try {
			return super.processZuulFilter(filter);
		} catch (Exception e) {
			RequestContext requestContext = RequestContext.getCurrentContext();
			requestContext.set("failed.filter", filter);
			throw e;
		}
	 }

}
